package com.lemurian.bankdata.lite.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

public enum UserStatus {
	
	ACTIVE('A'),
    INACTIVE('I'),
    LOCKED('L'),
    REMOVED('R');
	
	char statusCode;
	
	private static final Map<Character, UserStatus> lookup = new HashMap<Character, UserStatus>();
    private static final Map<String, UserStatus> lookupString = new HashMap<String, UserStatus>();

    static {
        for (UserStatus s : EnumSet.allOf(UserStatus.class)) {
            getLookup().put(s.code(), s);
            getLookupString().put(s.name(), s);
        }

    }

    public static Map<Character, UserStatus> getLookup() {
        return lookup;
    }

    public static Map<String, UserStatus> getLookupString() {
        return lookupString;
    }

    UserStatus(char statusCode) {
        this.statusCode = statusCode;
    }

    public char code() {
        return statusCode;
    }
}

